home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
net
/
parnet-3.2
/
extras
/
parpc
/
pcfiles
/
get.c
next >
Wrap
C/C++ Source or Header
|
1995-03-09
|
734b
|
31 lines
/* GET.C: Testing receipt of large amount data (without use of interrupts)
* 1. On the PC, type: get
* 2. On the Amiga, type: machaddr 4
* dump 1 4
*/
#include <stdio.h>
#include "pardev.h"
main(int argc,char **argv)
{
unsigned char buffer[4096+8];
unsigned int Length;
unsigned long count=0;
ParAddress(1,0x03bc);
printf("port: chksum: length: Kb:\n");
while(1)
if (ParDataReady())
{
Length=ParRead(buffer,4096+8);
if (Length >0)
{
printf("%04x %04x %08x ",buffer[0]*256+buffer[1],
buffer[2]*256+buffer[3],
buffer[4]*65536+buffer[5]*4096+buffer[6]*256+buffer[7]);
printf("%d\n",count/1024);count+=Length;
}
}
}